/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package hispamail;

import java.io.File;
import java.io.FilenameFilter;

/**
 *
 * @author MCS
 * Usada para buscar ficheros por extensión
 * 
 */
public class CFilenameFilter implements FilenameFilter {

    private final String ext;

    public CFilenameFilter(String ext) {
        this.ext = ext.toLowerCase();
    }

    @Override
    public boolean accept(File dir, String name) {
        return name.toLowerCase().endsWith(ext);
    }
}
